<?php
/**
 * Created by PhpStorm.
 * User: R.Ice
 * Date: 2018/8/23
 * Time: 16:35
 * name:新增作业附件
 * url:/erpHomework/add_homework_attachment
 */

$oha_octid    = $route->bodyParams['oha_octid'];          //课时id
$oha_osid    = $route->bodyParams['oha_osid'];          //学生id
$oha_type    = $route->bodyParams['oha_type'];          //附件格式 0-不限制 1-文字 2-图片 3-word 4-exel 5-视频
$oha_name = $route->bodyParams['oha_name'];       //附件名称
$oha_content = $route->bodyParams['oha_content'];       //附件内容
$oha_action_type = $route->bodyParams['oha_action_type']; //附件操作类型 0-创建作业附件 1-批改作业附件 2-提交作业附件


//写入数组
$insertArr = [
    'oha_octid'              => $oha_octid,
    'oha_osid'              => $oha_osid,
    'oha_type'              => $oha_type,
    'oha_name'              => $oha_name,
    'oha_content'              => $oha_content,
    'oha_action_type'              => $oha_action_type,
];
//执行写入语句
$rsData = $db->mysqlDB->insert("oa_homework_attachment",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );